<?php

namespace App\Models\User;

use App\Models\Common\CommonModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class PointLog extends CommonModel
{
    use HasFactory;

    protected $table = 'point_log';
    protected $appends = ['action_name'];

    public function getActionNameAttribute() {
        return $this->action=='add'?'加分':'减分';
    }

    public function getUser() {
        return $this->hasOne(User::class,'id','user_id');
    }


}
